package task02;

public class Division {
    private int cacheNumber;
    private int cacheResult;

    public int divideByTwo(int number) {
        if (number == cacheNumber) {
            return cacheResult;
        } else {
            int result = number / 2;
            cacheNumber = number;
            cacheResult = result;
            return result;
        }
    }
}
